<template>
  <div class="head" :style="{'background-color': color[1]}">
    <i :style="{'background-color': color[0]}" />
    <div class="text" :style="{'color': color[2]}"><slot /></div>
  </div>
</template>

<script>
export default {
  props: {
    color: {
      type: Array,
      default: () => ['#33a8c1', '#33c5e8', '#fff']
    }
  }
}
</script>

<style scoped>
.head {
  display: inline-block;
  padding-right: 20px;
  padding-left: 12px;
  background-color: #33c5e8;
  position: relative;
}
.head i {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  height: 50px;
  width: 8px;
  background-color: #33a8c1;
  border-radius: 100px;
}
.head::after {
  content: "";
  position: absolute;
  top: 0;
  left: 100%;
  height: 50px;
  width: 20px;
  background: #fff;
  transform: rotate(15deg);
  transform-origin: top;
}
.text {
  text-align: center;
  color: #fff;
  font-size: 30px;
}
</style>
